import request from '@/utils/request'

// 查询订单管理列表
export function listOrderInfo(query) {
  return request({
    url: '/business/orderInfo/list',
    method: 'get',
    params: query
  })
}

// 查询订单管理详细
export function getOrderInfo(outerOrderNo) {
  return request({
    url: '/business/orderInfo/' + outerOrderNo,
    method: 'get'
  })
}

// 新增订单管理
export function addOrderInfo(data) {
  return request({
    url: '/business/orderInfo',
    method: 'post',
    data: data
  })
}
//批量新增
export function batchCopy(data) {
  return request({
    url: '/business/orderInfo/batchCopy',
    method: 'post',
    data: data
  })
}

// 修改订单管理
export function updateOrderInfo(data) {
  return request({
    url: '/business/orderInfo',
    method: 'put',
    data: data
  })
}

// 删除订单管理
export function delOrderInfo(outerOrderNo) {
  return request({
    url: '/business/orderInfo/' + outerOrderNo,
    method: 'delete'
  })

}


//外部订单发送
export function sendOrderInfo(data) {
    return request({
      url: '/business/orderInfo/sendOrderInfo',
      method: 'post',
      data: data
    })
}
//外部订单 发货
export function sendLogistics(data) {
  return request({
    url: '/business/orderInfo/sendLogistics',
    method: 'post',
    data: data
  })
}
//外部订单  完成
export function sendFinishStatus(data) {
  return request({
    url: '/business/orderInfo/sendFinishStatus',
    method: 'post',
    data: data
  })
}

//外部订单  作废
export function sendCancelStatus(data) {
  return request({
    url: '/business/orderInfo/sendCancelStatus',
    method: 'post',
    data: data
  })
}

//批量新增商品信息
export function batchInsert(data) {
  return request({
    url: '/business/orderInfo/sendCancelStatus',
    method: 'post',
    data: data
  })
}
//恢复
export function restoreStatus(data) {
  return request({
    url: '/business/orderInfo/restoreStatus',
    method: 'post',
    data: data
  })
}
